<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\PollNews
 *
 * @property integer $id
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property integer $poll_id
 * @property string $title
 * @property string $content
 * @method static \Illuminate\Database\Query\Builder|\App\Models\PollNews whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\PollNews whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\PollNews whereUpdatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\PollNews wherePollId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\PollNews whereTitle($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\PollNews whereContent($value)
 * @mixin \Eloquent
 * @property-read \App\Models\Poll $poll
 */
class PollNews extends Model
{
    protected $table = 'poll_news';
    
    public $fillable = [
        'poll_id',
        'title',
        'content',
    ];

    public function poll()
    {
        return $this->belongsTo(Poll::class, 'poll_id');
    }
}